package com.wn.icloud.provider.uac.controller;


import com.wn.icloud.common.exception.BaseException;
import com.wn.icloud.common.msg.ObjectRestResponse;
import com.wn.icloud.controller.BaseCheckController;
import com.wn.icloud.provider.uac.constant.AdminCommonConstant;
import com.wn.icloud.provider.uac.entity.Menu;
import com.wn.icloud.provider.uac.service.SendSmsService;
import com.wn.icloud.provider.uac.vo.MenuTree;
import com.wn.icloud.provider.uac.vo.SendSmsReqVO;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import tk.mybatis.mapper.entity.Example;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * @author skf
 * @create 2020-04-25 11:49
 */
@RestController
@RequestMapping("/api")
public class SendSmsController extends BaseCheckController {

    @Autowired
    private SendSmsService sendSmsService;

    @PostMapping(value = "/send/sms")
    public ObjectRestResponse sendSms(@RequestBody SendSmsReqVO sendSmsReqVO) throws BaseException {
        checkNotNull(sendSmsReqVO);
        checkNotNull(sendSmsReqVO.getPhoneNumber());
        checkNotNull(sendSmsReqVO.getSsCode());
        checkNotNull(sendSmsReqVO.getType());
        return sendSmsService.sendSms(sendSmsReqVO);
    }




}
